package fi.pakkanen.yarpg.item.trait;

/**
 * An item that can be triggered.
 * 
 * @author Oliver Michels <oliver.michels@gmx.net>
 * @see Consumable
 * 
 */
public interface Triggerable {

	/**
	 * Trigger the item.
	 */
	public void trigger();

	/**
	 * Get the time in seconds to re-charge the item again after it was used and
	 * before it can be used again.
	 * 
	 * @return the time to re-charge the item
	 */
	public int getRechargetime();

	/**
	 * Check whether the item needs to be recharged after it was used and before
	 * it can be used again.
	 * 
	 * @return true when it needs to be recharged, false otherwise
	 */
	public boolean needsRecharging();

	/**
	 * Get the duration how long the item is active when triggered.
	 * 
	 * @return the duration in seconds
	 */
	public int getDuration();

	/**
	 * Check whether the item has a duration.
	 * 
	 * @return true when the item has a duration, false otherwise
	 */
	public boolean hasDuration();

	/**
	 * Check whether the item is currently re-charging.
	 * 
	 * @return true when it is re-charging, false otherwise
	 */
	public boolean isRecharging();

	/**
	 * Check whether the item was triggered and is currently active.
	 * 
	 * @return true when the item is active, false otherwise
	 */
	public boolean isActive();

	/**
	 * Check whether the item is currently inactive.
	 * 
	 * It is inactive, when it hasn't been triggered recently and it is not
	 * re-charging.
	 * 
	 * @return true when it is inactive, false otherwise
	 */
	public boolean isInactive();
}
